package com.wen.springbootorderrabbitmqconsumer.service.topic;

import org.springframework.amqp.core.ExchangeTypes;
import org.springframework.amqp.rabbit.annotation.*;
import org.springframework.stereotype.Service;

@Service
@RabbitListener(bindings = @QueueBinding(value = @Queue(value = "email.topic.exchange",declare = "true",autoDelete = "false"),
        exchange = @Exchange(value = "topic_order_exchange",type = ExchangeTypes.TOPIC),key = "#.email.*"
))
public class TopicEmailConsumer {


    @RabbitHandler
    public void reviceMessage(String message){
        System.out.println("email_topic,接收到的消息是==》"+message);
    }


}
